package server;

import java.rmi.server.UnicastRemoteObject;

import common.exchange;

public class exchangeimpl extends UnicastRemoteObject implements exchange{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	final double rate=21050;
	public exchangeimpl() throws Exception {
	}

	@Override
	public double usd2vnd(double amount) throws Exception {
		return amount*rate;
	}

	@Override
	public double vnd2usd(double amount) throws Exception {
		return amount/rate;
	}
}
